Skip to content

Autofocus search input on homepage load - #29

Merged
kuzdogan merged 1 commit into
mainfrom
autofocus-search-input
Aug 17, 2026
Merged

Autofocus search input on homepage load#29
kuzdogan merged 1 commit into
mainfrom
autofocus-search-input

Conversation

@kuzdogan

Copy link
Copy Markdown
Member

Focus the search input as soon as the homepage loads, so you can start typing right away instead of clicking into the field first.

What changed

  • Added a ref to the search input in src/app/page.tsx.
  • On mount (the same useEffect that loads the URL query and stats), call .focus() on that input.

If the page opens with a ?q= query in the URL, the existing behavior still runs (it loads the query and searches); the input is also focused.

🤖 Generated with Claude Code

Focus the search input on mount so users can type immediately
without clicking into it first.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kuzdogan
kuzdogan merged commit 135f355 into main Aug 17, 2026
@manuelwedler

Copy link
Copy Markdown
Member

@kuzdogan this was merged to main directly, but we have a staging branch for 4byte too. Creating this PR to fix staging: #30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants